package com.ctshk.rpc.localfun.service;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.model.TokenUser;
import com.ctshk.rpc.localfun.dto.LocalFunResourceDTO;
import com.ctshk.rpc.localfun.dto.LocalFunResourceDetailDTO;
import com.ctshk.rpc.localfun.req.*;

import java.time.LocalDate;
import java.util.List;

/**
 * @author 万思
 * @descroption 资源中心接口-API
 * @since 2021-03-22
 */
public interface ILocalFunResourceService {

    /**
     * 当地游玩-产品列表
     * @param localFunResourceReq
     * @param currentUser
     * @return
     */
    PageResponse<LocalFunResourceDTO> queryList(LocalFunResourceReq localFunResourceReq, TokenUser currentUser);


    /**
     * 批量修改售卖状态
     * @param localFunResourceSaleReq   请求参数
     * @param currentUser               当前用户ID
     * @return
     */
    Result<Long> updateSaleStatus(LocalFunResourceSaleReq localFunResourceSaleReq, TokenUser currentUser);

    /**
     * 新增产品设置-保存
     * @param resourceProductReq    请求参数
     * @param currentUser           当前用户ID
     * @return
     */
    Result<Long> save(LocalFunResourceProductReq resourceProductReq, TokenUser currentUser);

    /**
     * 编辑产品设置-保存
     * @param resourceProductReq    请求参数
     * @param currentUser           当前用户ID
     * @return
     */
    Result<Long> modify(LocalFunResourceProductReq resourceProductReq, TokenUser currentUser);

    /**
     * 新增、编辑预订设置-保存
     * @param scenicProductSaveReq  请求参数
     * @return
     */
    Result<Long> saveAgent(LocalFunProductSaveReq scenicProductSaveReq);

    /**
     * 产品详情
     * @param id            产品表ID
     * @param queryDate
     * @param currentUser   用户信息
     * @return
     */
    Result<LocalFunResourceDetailDTO> detail(Long id, LocalDate queryDate, TokenUser currentUser);

    /**
     * API批量设置
     * @param resourceApiReq
     * @return
     */
    Result<Long> updateApi(LocalFunResourceApiReq resourceApiReq);

    /**
     * 新增、编辑提交审批
     * @param localFunProductSubmitReq
     * @param currentUser
     * @return
     */
    Result<String> submit(LocalFunProductSubmitReq localFunProductSubmitReq, TokenUser currentUser);

    /**
     * 获取产品信息
     * @param id
     * @return
     */
    Result<LocalFunResourceDetailDTO> productDetail(Long id);


    /**
     * 更新审批状态
     * @param req
     * @return
     */
    Result<Long> updateApproveStatus(LocalFunUpdateApproveStatusReq req);


    /**
     * 产品列表-提供给推广码
     * @param localFunResourceReq
     * @return
     */
    PageResponse<LocalFunResourceDTO> queryListByProductIds(LocalFunResourceReq localFunResourceReq);

    /**
     * 获取产品ID
     * @param localFunResourceReq
     * @return
     */
    List<LocalFunResourceDTO> queryListByProductIds2(LocalFunResourceReq localFunResourceReq);
    void testTX();

    /**
     * 检查审批情况进行更新
     * @param localFunProductCheckReq
     * @param currentUser
     * @return
     */
    Result<Long> check(LocalFunProductCheckReq localFunProductCheckReq, TokenUser currentUser);
}
